package jk.fox.config.exchange.standard;

import jk.fox.common.payload.message.MessageDispatcher;
import jk.fox.config.exchange.ExchangeConfiguration;
import jk.fox.exchange.server.DefaultExchange;
import jk.fox.exchange.Exchange;
import lombok.Getter;
import lombok.Setter;

/**
 * @author cuichao
 * @Description: DefaultExchangeConfiguration
 * @Date: create in 2020/6/3 23:32
 */
@Getter
@Setter
public class DefaultExchangeConfiguration extends ExchangeConfiguration {

    /**
     * 连接最大重试次数
     */
    private int connectMaxRetries = 3;
    /**
     *  连接最大重试间隔
     */
    private long connectRetryIntervalMS = 10000L;


    @Override
    public Exchange create(MessageDispatcher dispatcher) {
        return new DefaultExchange(this,dispatcher );
    }
}
